//时间格式化函数
export function dateFormat(time, i, num = 1) {
	var date = new Date(time*num);
	var year = date.getFullYear();
	var month = (date.getMonth() + 1 + '').padStart(2, '0')
	var day = (date.getDate() + '').padStart(2, '0')
	var hours = (date.getHours() + '').padStart(2, '0')
	var minutes = (date.getMinutes() + '').padStart(2, '0')
	var seconds = (date.getSeconds() + '').padStart(2, '0')
	if (i == 0) {
		return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
	}
	if (i == 2) {
		return year + "-" + month + "-" + day + " " + hours + ":" + minutes;
	}
	return year + "-" + month + "-" + day;
}